/*
 * com_cute4j_swing_graphics_Font.cpp  0.4.0 / 2010-12-23
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
#include "com_cute4j_swing_graphics_Font.h"

#include "FontMetricsDelegate.h"
#include "QFontAdapter.h"

/*
 * Native implementation for: com.cute4j.swing.graphics.Font
 */

JNIEXPORT jlong JNICALL
Java_com_cute4j_swing_graphics_Font__1create
  (JNIEnv *env, jobject obj, jstring name, jint style, jint size)
{
  return QFontAdapter::newInstance(env, obj, name, style, size);
}

JNIEXPORT jlong JNICALL
Java_com_cute4j_swing_graphics_Font__1createFontMetrics
  (JNIEnv *env, jobject obj, jlong fontPonter)
{
  return QFontAdapter::newFontMetricsInstance(env, obj, fontPonter);
}

JNIEXPORT void JNICALL
Java_com_cute4j_swing_graphics_Font__1destroy
  (JNIEnv *, jobject, jlong fontPonter)
{
  delete qFontAdapter;
}

JNIEXPORT void JNICALL
Java_com_cute4j_swing_graphics_Font__1destroyFontMetrics
  (JNIEnv *, jobject, jlong fontMetricsPointer)
{
  delete FONT_METRICS;
}

JNIEXPORT jstring JNICALL
Java_com_cute4j_swing_graphics_Font__1getDefaultFontName
  (JNIEnv *env, jclass cls)
{
  return QFontAdapter::getDefaultFontName(env, cls);
}


